Garbage collection is an automatic memory management process that identifies data units, such as objects, in memory that are no longer being referenced and frees those objects. As memory data units, or objects, of varying sizes are allocated and later freed, the memory in which they are stored becomes increasingly fragmented. Eventually, vary few large free areas of memory exist, and it becomes difficult to store additional objects without increasing the memory size. When this occurs, a process within garbage collection, referred to as compaction, may be employed in order to consolidate the allocated objects into one large area, leaving another large area of free space available for new objects. During consolidation, the memory objects that are still being referenced are consolidated in one area of memory.